package com.ftg.exam.manage.service;

import com.ftg.exam.manage.mapper.OneChoiceMapper;
import com.ftg.exam.manage.pojo.OneChoice;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zwl
 * 单选题服务
 * Created on 2019/8/13 11:37
 */
@Service
public class OneChoiceService {
    @Autowired
    OneChoiceMapper oneChoiceMapper;
    public List<OneChoice> showall(OneChoice pageH){
        System.out.println(pageH+"service");
        List<OneChoice> list = oneChoiceMapper.showall(pageH);
        // pageH.setData(list);
        return list;
    }
    public List<OneChoice> showDifficulty(){
        return oneChoiceMapper.showDifficulty();
    }
    public int update(OneChoice oneChoice){
        return oneChoiceMapper.update(oneChoice);
    }
    public int delete(String id){
        return oneChoiceMapper.delete(id);
    }
    public int save(OneChoice oneChoice){
        return oneChoiceMapper.save(oneChoice);
    }
    public List<OneChoice> showone(OneChoice pageH){
        System.out.println(pageH+"service");
        List<OneChoice> list = oneChoiceMapper.showone(pageH);
        // pageH.setData(list);
        return list;
    }

}
